package com.groupbuying.customer.service;

import com.groupbuying.customer.domain.CustomerPrizeDO;
import com.groupbuying.customer.utils.apiresult.ApiResult;

import java.util.List;
import java.util.Map;

/**
 * 中奖表
 * 
 * @author gaoruijun
 * @email 18511893135@163.com
 * @date 2019-07-30 10:25:17
 * @des
 */

public interface CustomerPrizeService {
	
	CustomerPrizeDO get(String uuid);
	
	List<CustomerPrizeDO> list(Map<String, Object> map);
	
	int count(Map<String, Object> map);
	
	int save(CustomerPrizeDO customerPrize);
	
	int update(CustomerPrizeDO customerPrize);
	
	int remove(String uuid);

	int batchRemove(String[] uuids);

	/**
	 * 马拉松用户登陆
	 * @param param
	 * @return
	 */
	ApiResult wxRegistForPrize(Map<String,Object> param);

	/**
	 * 保存用户中奖信息
	 * @param param
	 * @return
	 */
	ApiResult savaPrizeMessage(Map<String,String> param);
	/**
	 * 获取所有中奖信息
	 * @return
	 */
	List<CustomerPrizeDO> getPrizeDetails(String source);

	ApiResult getMessageBytype(String type);

	/**
	 * 查询总数
	 * @param param
	 * @return
	 */
	Map<String,Object> sumPrize(Map<String,String> param);

	/**
	 * 查询马拉松用户
	 * @return
	 */
	Integer countCustomerForMls();

	/**
	 * 获取中奖来源中奖数量
	 * @return
	 */
	Map<String,Integer> sumEvenPrize();

	/**
	 * 转盘详情
	 * @param source
	 * @return
	 */
	List<CustomerPrizeDO> getPrizeFormSource(String source);
	/**
	 *大屏幕抽奖详情
	 * @param type
	 * @return
	 */
	List<CustomerPrizeDO> getPrizeFormType(String type);
	/**
	 * 保存大屏抽奖
	 */
	ApiResult saveScreen(Map<String,String> map);

	/**
	 * 根据customerId和source查询次数
	 * @param map
	 * @return
	 */
	ApiResult getTimeBySourceAndCustomerId(Map<String,String> map);

}
